
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Wgl
	{
		/// <summary>
		/// [WGL] Value of WGL_FRONT_COLOR_BUFFER_BIT_ARB symbol.
		/// </summary>
		[RequiredByFeature("WGL_ARB_buffer_region")]
		[Log(BitmaskName = "WGLColorBufferMask")]
		public const uint FRONT_COLOR_BUFFER_BIT_ARB = 0x00000001;

		/// <summary>
		/// [WGL] Value of WGL_BACK_COLOR_BUFFER_BIT_ARB symbol.
		/// </summary>
		[RequiredByFeature("WGL_ARB_buffer_region")]
		[Log(BitmaskName = "WGLColorBufferMask")]
		public const uint BACK_COLOR_BUFFER_BIT_ARB = 0x00000002;

		/// <summary>
		/// [WGL] Value of WGL_DEPTH_BUFFER_BIT_ARB symbol.
		/// </summary>
		[RequiredByFeature("WGL_ARB_buffer_region")]
		[Log(BitmaskName = "WGLColorBufferMask")]
		public const uint DEPTH_BUFFER_BIT_ARB = 0x00000004;

		/// <summary>
		/// [WGL] Value of WGL_STENCIL_BUFFER_BIT_ARB symbol.
		/// </summary>
		[RequiredByFeature("WGL_ARB_buffer_region")]
		[Log(BitmaskName = "WGLColorBufferMask")]
		public const uint STENCIL_BUFFER_BIT_ARB = 0x00000008;

		/// <summary>
		/// [WGL] wglCreateBufferRegionARB: Binding for wglCreateBufferRegionARB.
		/// </summary>
		/// <param name="hDC">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		/// <param name="iLayerPlane">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="uType">
		/// A <see cref="T:uint"/>.
		/// </param>
		[RequiredByFeature("WGL_ARB_buffer_region")]
		public static IntPtr CreateBufferRegionARB(IntPtr hDC, int iLayerPlane, uint uType)
		{
			IntPtr retValue;

			Debug.Assert(Delegates.pwglCreateBufferRegionARB != null, "pwglCreateBufferRegionARB not implemented");
			retValue = Delegates.pwglCreateBufferRegionARB(hDC, iLayerPlane, uType);
			LogCommand("wglCreateBufferRegionARB", retValue, hDC, iLayerPlane, uType			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglDeleteBufferRegionARB: Binding for wglDeleteBufferRegionARB.
		/// </summary>
		/// <param name="hRegion">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		[RequiredByFeature("WGL_ARB_buffer_region")]
		public static void DeleteBufferRegionARB(IntPtr hRegion)
		{
			Debug.Assert(Delegates.pwglDeleteBufferRegionARB != null, "pwglDeleteBufferRegionARB not implemented");
			Delegates.pwglDeleteBufferRegionARB(hRegion);
			LogCommand("wglDeleteBufferRegionARB", null, hRegion			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [WGL] wglSaveBufferRegionARB: Binding for wglSaveBufferRegionARB.
		/// </summary>
		/// <param name="hRegion">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		/// <param name="x">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="y">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="width">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="height">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("WGL_ARB_buffer_region")]
		public static bool SaveBufferRegionARB(IntPtr hRegion, int x, int y, int width, int height)
		{
			bool retValue;

			Debug.Assert(Delegates.pwglSaveBufferRegionARB != null, "pwglSaveBufferRegionARB not implemented");
			retValue = Delegates.pwglSaveBufferRegionARB(hRegion, x, y, width, height);
			LogCommand("wglSaveBufferRegionARB", retValue, hRegion, x, y, width, height			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [WGL] wglRestoreBufferRegionARB: Binding for wglRestoreBufferRegionARB.
		/// </summary>
		/// <param name="hRegion">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		/// <param name="x">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="y">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="width">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="height">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="xSrc">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="ySrc">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("WGL_ARB_buffer_region")]
		public static bool RestoreBufferRegionARB(IntPtr hRegion, int x, int y, int width, int height, int xSrc, int ySrc)
		{
			bool retValue;

			Debug.Assert(Delegates.pwglRestoreBufferRegionARB != null, "pwglRestoreBufferRegionARB not implemented");
			retValue = Delegates.pwglRestoreBufferRegionARB(hRegion, x, y, width, height, xSrc, ySrc);
			LogCommand("wglRestoreBufferRegionARB", retValue, hRegion, x, y, width, height, xSrc, ySrc			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("WGL_ARB_buffer_region")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate IntPtr wglCreateBufferRegionARB(IntPtr hDC, int iLayerPlane, uint uType);

			[RequiredByFeature("WGL_ARB_buffer_region")]
			internal static wglCreateBufferRegionARB pwglCreateBufferRegionARB;

			[RequiredByFeature("WGL_ARB_buffer_region")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void wglDeleteBufferRegionARB(IntPtr hRegion);

			[RequiredByFeature("WGL_ARB_buffer_region")]
			internal static wglDeleteBufferRegionARB pwglDeleteBufferRegionARB;

			[RequiredByFeature("WGL_ARB_buffer_region")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate bool wglSaveBufferRegionARB(IntPtr hRegion, int x, int y, int width, int height);

			[RequiredByFeature("WGL_ARB_buffer_region")]
			internal static wglSaveBufferRegionARB pwglSaveBufferRegionARB;

			[RequiredByFeature("WGL_ARB_buffer_region")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate bool wglRestoreBufferRegionARB(IntPtr hRegion, int x, int y, int width, int height, int xSrc, int ySrc);

			[RequiredByFeature("WGL_ARB_buffer_region")]
			internal static wglRestoreBufferRegionARB pwglRestoreBufferRegionARB;

		}
	}

}
